Initialize recycled continuations in createContinuation before usage#18649
Initialize recycled continuations in createContinuation before usage#18649pshipton merged 1 commit intoeclipse-openj9:masterfrom
Conversation
Currently, recycled continuations are reset and initialized in freeContinuation at the end of their use. There are also gaps where the recycled continuation might retain old values and not be properly reset. The above approach leads to corruption and segfaults as seen in the runJavaThread failure reported in eclipse-openj9#16728. To fix the above crash, all continuations (new and recycled) are initialized and reset in createContinuation just before the continuation begins execution. Related: eclipse-openj9#16728 Signed-off-by: Babneet Singh <[email protected]>
|
jenkins test sanity.functional,sanity.openjdk zlinux,win,aix jdk21 |
How do the gaps arise? Were the recycled continuations not being fully reset? |
Yes, continuations not being fully reset is part of the reason. In I also tried to mirror the Further, the |
|
JDK21 win sanity.openjdk build is taking too much time. Since all other builds have passed, it might not be worth to wait for its completion. Ran a 100x Skynet grinder (25x on 4 different AIX machines): https://openj9-jenkins.osuosl.org/job/Grinder/3148. Ran the grinder with @pshipton Can you please review/merge this PR? |
Depends on - eclipse-openj9/openj9#18649 - eclipse-openj9/openj9#18657 - eclipse-openj9/openj9#18658 Closes eclipse-openj9/openj9#16728 Signed-off-by: Babneet Singh <[email protected]>
Depends on - eclipse-openj9/openj9#18649 - eclipse-openj9/openj9#18657 - eclipse-openj9/openj9#18658 Closes eclipse-openj9/openj9#16728 Signed-off-by: Babneet Singh <[email protected]>
Depends on - eclipse-openj9/openj9#18649 - eclipse-openj9/openj9#18657 - eclipse-openj9/openj9#18658 Closes eclipse-openj9/openj9#16728 Signed-off-by: Babneet Singh <[email protected]>
Depends on - eclipse-openj9/openj9#18649 - eclipse-openj9/openj9#18657 - eclipse-openj9/openj9#18658 Signed-off-by: Babneet Singh <[email protected]>
Depends on - eclipse-openj9/openj9#18649 - eclipse-openj9/openj9#18657 - eclipse-openj9/openj9#18658 Signed-off-by: Babneet Singh <[email protected]>
Depends on - eclipse-openj9/openj9#18649 - eclipse-openj9/openj9#18657 - eclipse-openj9/openj9#18658 Signed-off-by: Babneet Singh <[email protected]>
|
I had noticed that recycled stacks where appear beneath current stacks, in some cases the stack walker would walk both. Also, the carrier sp would change between vthread mount and unmount. I think some of that can be explained by not resetting all the fields. Given the issue is not reproduceable, and the proposed change is correct, I say we go ahead with this. |
JDK21 win sanity.openjdk build job was aborted by the infra scripts because the timeout limit was hit. |
|
No failures in windows testing |
Depends on - eclipse-openj9/openj9#18649 - eclipse-openj9/openj9#18657 - eclipse-openj9/openj9#18658 Signed-off-by: Babneet Singh <[email protected]>
Depends on - eclipse-openj9/openj9#18649 - eclipse-openj9/openj9#18657 - eclipse-openj9/openj9#18658 Signed-off-by: Babneet Singh <[email protected]>
Depends on - eclipse-openj9/openj9#18649 - eclipse-openj9/openj9#18657 - eclipse-openj9/openj9#18658 Closes eclipse-openj9/openj9#16728 Signed-off-by: Babneet Singh <[email protected]>
Currently, recycled continuations are reset and initialized in
freeContinuationat the end of their use. There are also gaps wherethe recycled continuation might retain old values and not be properly
reset.
The above approach leads to corruption and segfaults as seen in
the
runJavaThreadfailure reported in #16728.To fix the above crash, all continuations (new and recycled) are
initialized and reset in
createContinuationjust before thecontinuation begins execution.
Related: #16728